namespace Galplay {
  internal class ScriptClear : GalScript {
    public int Slot { get; set; }
    public int SlotTo { get; set; }

    public ScriptClear(GalScene owner, XmlNode item): base(owner, item, ScriptType.Clear) {
      Slot = 0;
      SlotTo = 0;

      var split = item.InnerText.Split("~");
      Slot = ParseInt(split[0]);

      if (split.Length >= 2){
        SlotTo = ParseInt(split[1]);
      }
    }

    public override void Execute(GameScenePlayer player) {
      if (SlotTo == 0){
        player.imageManager.HidePicture(Slot);
      }else{
        player.imageManager.HidePicture(Slot, SlotTo);
      }
    }
  }
}